
# 腾讯云短信应用的 app_id
TENCENT_SMS_APP_ID = 1400701653

# 腾讯云短信应用的 app_key
TENCENT_SMS_APP_KEY = "b1b9ea8f890bf0dcfb89cf7c49bdb6d7"

# 腾讯云短信签名内容
TENCENT_SMS_SIGN = "ssaskhao公众号"

# 模板id选择
TENCENT_SMS_TEMPLATE = {
    'register': 1460927,
    'login': 1460910,
    'reset': 1770645,
}

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'detection',
        'USER': 'detection',
        'PASSWORD': '123456',
        'HOST': 'localhost',
        'PORT': '3306'
    }
}
import socket
# 函数 gethostname() 返回当前正在执行 Python 的系统主机名
res = socket.gethostbyname(socket.gethostname())

CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://"+res+":6379", # 安装redis的主机的 IP 和 端口
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
            "CONNECTION_POOL_KWARGS": {
                "max_connections": 1000,
                "encoding": 'utf-8'
            },
            "PASSWORD": "123456" # redis密码
        }
    }
}
